{{#tree-list}}
    {{#tree-list-item hasChildren=sample.items.length as |options|}}
        {{#if (eq options.section "item")}}
            {{#list-item-text class="title"}}
                Items
            {{/list-item-text}}
            {{list-item-icon icon='add' action=(action 'addItem' sample)}}
        {{else if (eq options.section "subtrees")}}
            {{#each sample.items as |item|}}
                {{#unless item.parent}}
                    {{#data-structure-annotations sample=sample item=item annotationColors=annotationColors}}
                        {{#link-to 'projects.project.spider.sample.data.item' item}}
                            {{list-item-badge value=(or item.elements.length 0)}}
                            {{list-item-icon icon='schema'}}
                            {{list-item-item-schema item=item selecting=(mut item.new)}}
                            {{list-item-add-annotation-menu item=item}}
                            {{list-item-icon icon='remove' action=(action 'removeItem' item) disabled=(lte sample.items.length 1) bubbles=false}}
                        {{/link-to}}
                    {{/data-structure-annotations}}
                {{/unless}}
            {{/each}}
        {{/if}}
    {{/tree-list-item}}
{{/tree-list}}
